﻿namespace Rsdn.SmartApp
{
    using JetBrains.Annotations;
    using System;

    /// <summary>
    /// Simple element info implementation.
    /// </summary>
    public abstract class ElementInfo
    {
        private readonly string _description;
        private readonly System.Type _type;

        /// <summary>
        /// Initialize instance.
        /// </summary>
        protected ElementInfo(System.Type type)
            : this(type, "")
        {
        }

        /// <summary>
        /// Initialize instance.
        /// </summary>
        protected ElementInfo([NotNull] System.Type type, string description)
        {
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }
            this._type = type;
            this._description = description;
        }

        /// <summary>
        /// Element description.
        /// </summary>
        public string Description
        {
            get
            {
                return this._description;
            }
        }

        /// <summary>
        /// Element type.
        /// </summary>
        public System.Type Type
        {
            get
            {
                return this._type;
            }
        }
    }
}

